package org.example.spring.simple.demon.service.impl;

import org.example.spring.simple.demon.service.IModifyService;
import org.example.spring.simple.framework.annotation.ZService;

/**
 * 增删改业务
 * @author Tom
 *
 */
@ZService
public class ModifyService implements IModifyService {

    /**
     * 增加
     */
    @Override
    public String add(String name,String addr) throws Exception {
        throw new Exception("这是Tom老师故意抛的异常！！");
        //return "modifyService add,name=" + name + ",addr=" + addr;
    }

    /**
     * 修改
     */
    @Override
    public String edit(Integer id,String name) {
        return "modifyService edit,id=" + id + ",name=" + name;
    }

    /**
     * 删除
     */
    @Override
    public String remove(Integer id) {
        return "modifyService id=" + id;
    }

}